import { FC, useMemo } from "react";
import { Outlet,  } from 'umi';

import mitt from "mitt";

import GlobalContext from "@/context";

const BasicLayout: FC<any> = (props) => {
  const { children } = props;

  const emitter = useMemo(() => {
    return mitt();
  }, []);
  console.log('children, whx ', children, props);
    sessionStorage.setItem('MODULE_KEY', 'arcv');
  return (
    <GlobalContext.Provider value={{ emitter }}>
      wxhte 01
      {children}
      <Outlet />
    </GlobalContext.Provider>
  );
};

export default BasicLayout;
